<div class="bomons view">
<h2><?php  __('Bộ môn');?></h2>
	
	<table class="table table-striped" style="width:50%">
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Mã bộ môn'); ?></td>
			<td><?php echo $bomon['Bomon']['bomon_maso']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Tên bộ môn'); ?></td>
			<td><?php echo $bomon['Bomon']['bm_ten']; ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Đơn vị'); ?></td>
			<td><?php echo $this->Html->link($bomon['Donvi']['dv_ten'], array('controller' => 'donvis', 'action' => 'view', $bomon['Donvi']['dv_ten'])); ?>&nbsp;</td>
		</tr>
		<tr>
			<td style="width:30%;font-weight:bold"><?php __('Ghi chú'); ?></td>
			<td><?php echo $bomon['Bomon']['ghichu']; ?>&nbsp;</td>
		</tr>
</table>
</div>
<div class="actions">
	<h3><?php __('Cập nhật'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Sửa bộ môn', true), array('action' => 'edit', $bomon['Bomon']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Xóa bộ môn', true), array('action' => 'delete', $bomon['Bomon']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $bomon['Bomon']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách bộ môn', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm bộ môn', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách đơn vị', true), array('controller' => 'donvis', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm đơn vị', true), array('controller' => 'donvis', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách cán bộ', true), array('controller' => 'canbos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm cán bộ', true), array('controller' => 'canbos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách ngành', true), array('controller' => 'nganhs', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Thêm ngành', true), array('controller' => 'nganhs', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Danh sách cán bộ thuộc bộ môn ');?><?= $bomon['Bomon']['bm_ten']; ?></h3>
	<?php 
//print_r($bomon);
	if (!empty($bomon['Canbo'])):?>
	<table class="table table-consended table-bordered table-hover">
	<tr class="info">
		<th><?php __('STT'); ?></th>
		<th><?php __('Mã cán bộ'); ?></th>
		<th><?php __('Họ tên'); ?></th>
		<th><?php __('Ngày sinh'); ?></th>
		<th><?php __('Nơi sinh'); ?></th>
		<th><?php __('Địa chỉ'); ?></th>
		<th><?php __('Giới tính'); ?></th>
		<th><?php __('Điện thoại'); ?></th>
		<th><?php __('Hệ số lương'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Ghi chú'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		$stt = 0;
		foreach ($bomon['Canbo'] as $canbo):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td style="text-align:right"><?php echo ++$stt; ?></td>
			<td style="text-align:center"><?php echo $canbo['cb_maso'];?></td>
			<td><?php echo $canbo['cb_hoten'];?></td>
			<td><?php echo date('d-m-Y',strtotime($canbo['cb_ngaysinh']));?></td>
			<td><?php echo $canbo['cb_noisinh'];?></td>
			<td><?php echo $canbo['cb_diachi'];?></td>
			<td style="text-align:center">
				<?php if($canbo['cb_gioitinh'] == 1){
						echo "Nam";
					}  else echo "Nữ";?></td>
			<td style="text-align:center"><?php echo $canbo['cb_dienthoai'];?></td>
			<td style="text-align:center"> <?php echo $canbo['cb_hsluong'];?></td>
			<td><?php echo $canbo['cb_email'];?></td>
			<td><?php echo $canbo['ghichu'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Xem', true), array('controller' => 'canbos', 'action' => 'view', $canbo['id'])); ?>
				<?php echo $this->Html->link(__('Sửa', true), array('controller' => 'canbos', 'action' => 'edit', $canbo['id'])); ?>
				<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'canbos', 'action' => 'delete', $canbo['id']), null, sprintf(__('Có chắc bạn muốn xóa cán bộ # %s?', true), $canbo['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Thêm cán bộ', true), array('controller' => 'canbos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Danh sách ngành thuộc bộ môn ');?><?= $bomon['Bomon']['bm_ten']; ?></h3>
	<?php if (!empty($bomon['Nganh'])):?>
	<table class="table table-consended table-striped table-bordered table-hover">
	<tr class="info">
		<th><?php __('STT'); ?></th>
		<th><?php __('Mã ngành'); ?></th>
		<th><?php __('Tên ngành'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		$stt = 0;
		foreach ($bomon['Nganh'] as $nganh):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td style="text-align:right"><?php echo ++$stt; ?></td>
			<td style="text-align:center"><?php echo $nganh['nganh_maso'];?></td>
			<td><?php echo $nganh['nganh_ten'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Xem', true), array('controller' => 'nganhs', 'action' => 'view', $nganh['id'])); ?>
				<?php echo $this->Html->link(__('Sửa', true), array('controller' => 'nganhs', 'action' => 'edit', $nganh['id'])); ?>
				<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'nganhs', 'action' => 'delete', $nganh['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $nganh['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Thêm ngành', true), array('controller' => 'nganhs', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
